Optimal. Leaf size=146 \[ -\frac {7 \tanh ^{-1}\left (\frac {\sqrt {a} \cos (c+d x)}{\sqrt {a+a \sin (c+d x)}}\right )}{4 \sqrt {a} d}+\frac {\sqrt {2} \tanh ^{-1}\left (\frac {\sqrt {a} \cos (c+d x)}{\sqrt {2} \sqrt {a+a \sin (c+d x)}}\right )}{\sqrt {a} d}+\frac {\cot (c+d x)}{4 d \sqrt {a+a \sin (c+d x)}}-\frac {\cot (c+d x) \csc (c+d x)}{2 d \sqrt {a+a \sin (c+d x)}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.23, antiderivative size = 146, normalized size of antiderivative = 1.00, number of steps
used = 7, number of rules used = 6, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.261, Rules used = {2858, 3063,
3064, 2728, 212, 2852} \begin {gather*} \frac {\cot (c+d x)}{4 d \sqrt {a \sin (c+d x)+a}}-\frac {7 \tanh ^{-1}\left (\frac {\sqrt {a} \cos (c+d x)}{\sqrt {a \sin (c+d x)+a}}\right )}{4 \sqrt {a} d}+\frac {\sqrt {2} \tanh ^{-1}\left (\frac {\sqrt {a} \cos (c+d x)}{\sqrt {2} \sqrt {a \sin (c+d x)+a}}\right )}{\sqrt {a} d}-\frac {\cot (c+d x) \csc (c+d x)}{2 d \sqrt {a \sin (c+d x)+a}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 212
Rule 2728
Rule 2852
Rule 2858
Rule 3063
Rule 3064
Rubi steps
\begin {align*} \int \frac {\csc ^3(c+d x)}{\sqrt {a+a \sin (c+d x)}} \, dx &=-\frac {\cot (c+d x) \csc (c+d x)}{2 d \sqrt {a+a \sin (c+d x)}}-\frac {\int \frac {\csc ^2(c+d x) (a-3 a \sin (c+d x))}{\sqrt {a+a \sin (c+d x)}} \, dx}{4 a}\\ &=\frac {\cot (c+d x)}{4 d \sqrt {a+a \sin (c+d x)}}-\frac {\cot (c+d x) \csc (c+d x)}{2 d \sqrt {a+a \sin (c+d x)}}-\frac {\int \frac {\csc (c+d x) \left (-\frac {7 a^2}{2}+\frac {1}{2} a^2 \sin (c+d x)\right )}{\sqrt {a+a \sin (c+d x)}} \, dx}{4 a^2}\\ &=\frac {\cot (c+d x)}{4 d \sqrt {a+a \sin (c+d x)}}-\frac {\cot (c+d x) \csc (c+d x)}{2 d \sqrt {a+a \sin (c+d x)}}+\frac {7 \int \csc (c+d x) \sqrt {a+a \sin (c+d x)} \, dx}{8 a}-\int \frac {1}{\sqrt {a+a \sin (c+d x)}} \, dx\\ &=\frac {\cot (c+d x)}{4 d \sqrt {a+a \sin (c+d x)}}-\frac {\cot (c+d x) \csc (c+d x)}{2 d \sqrt {a+a \sin (c+d x)}}-\frac {7 \text {Subst}\left (\int \frac {1}{a-x^2} \, dx,x,\frac {a \cos (c+d x)}{\sqrt {a+a \sin (c+d x)}}\right )}{4 d}+\frac {2 \text {Subst}\left (\int \frac {1}{2 a-x^2} \, dx,x,\frac {a \cos (c+d x)}{\sqrt {a+a \sin (c+d x)}}\right )}{d}\\ &=-\frac {7 \tanh ^{-1}\left (\frac {\sqrt {a} \cos (c+d x)}{\sqrt {a+a \sin (c+d x)}}\right )}{4 \sqrt {a} d}+\frac {\sqrt {2} \tanh ^{-1}\left (\frac {\sqrt {a} \cos (c+d x)}{\sqrt {2} \sqrt {a+a \sin (c+d x)}}\right )}{\sqrt {a} d}+\frac {\cot (c+d x)}{4 d \sqrt {a+a \sin (c+d x)}}-\frac {\cot (c+d x) \csc (c+d x)}{2 d \sqrt {a+a \sin (c+d x)}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains complex when optimal does not.
time = 2.18, size = 307, normalized size = 2.10 \begin {gather*} \frac {\left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right ) \left (-8-(64+64 i) (-1)^{3/4} \tanh ^{-1}\left (\left (\frac {1}{2}+\frac {i}{2}\right ) (-1)^{3/4} \left (-1+\tan \left (\frac {1}{4} (c+d x)\right )\right )\right )+4 \cot \left (\frac {1}{4} (c+d x)\right )-\csc ^2\left (\frac {1}{4} (c+d x)\right )-28 \log \left (1+\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )+28 \log \left (1-\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )+\sec ^2\left (\frac {1}{4} (c+d x)\right )+\frac {2}{\left (\cos \left (\frac {1}{4} (c+d x)\right )-\sin \left (\frac {1}{4} (c+d x)\right )\right )^2}-\frac {8 \sin \left (\frac {1}{4} (c+d x)\right )}{\cos \left (\frac {1}{4} (c+d x)\right )-\sin \left (\frac {1}{4} (c+d x)\right )}-\frac {2}{\left (\cos \left (\frac {1}{4} (c+d x)\right )+\sin \left (\frac {1}{4} (c+d x)\right )\right )^2}+\frac {8 \sin \left (\frac {1}{4} (c+d x)\right )}{\cos \left (\frac {1}{4} (c+d x)\right )+\sin \left (\frac {1}{4} (c+d x)\right )}+4 \tan \left (\frac {1}{4} (c+d x)\right )\right )}{32 d \sqrt {a (1+\sin (c+d x))}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 2.56, size = 162, normalized size = 1.11
method | result | size |
default | \(-\frac {\left (1+\sin \left (d x +c \right )\right ) \sqrt {-a \left (\sin \left (d x +c \right )-1\right )}\, \left (7 a^{5} \arctanh \left (\frac {\sqrt {-a \left (\sin \left (d x +c \right )-1\right )}}{\sqrt {a}}\right ) \left (\sin ^{2}\left (d x +c \right )\right )+\left (-a \left (\sin \left (d x +c \right )-1\right )\right )^{\frac {3}{2}} a^{\frac {7}{2}}+\sqrt {-a \left (\sin \left (d x +c \right )-1\right )}\, a^{\frac {9}{2}}-4 \sqrt {2}\, \arctanh \left (\frac {\sqrt {-a \left (\sin \left (d x +c \right )-1\right )}\, \sqrt {2}}{2 \sqrt {a}}\right ) a^{5} \left (\sin ^{2}\left (d x +c \right )\right )\right )}{4 a^{\frac {11}{2}} \sin \left (d x +c \right )^{2} \cos \left (d x +c \right ) \sqrt {a +a \sin \left (d x +c \right )}\, d}\) | \(162\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 492 vs.
\(2 (121) = 242\).
time = 0.36, size = 492, normalized size = 3.37 \begin {gather*} \frac {7 \, {\left (\cos \left (d x + c\right )^{3} + \cos \left (d x + c\right )^{2} + {\left (\cos \left (d x + c\right )^{2} - 1\right )} \sin \left (d x + c\right ) - \cos \left (d x + c\right ) - 1\right )} \sqrt {a} \log \left (\frac {a \cos \left (d x + c\right )^{3} - 7 \, a \cos \left (d x + c\right )^{2} - 4 \, {\left (\cos \left (d x + c\right )^{2} + {\left (\cos \left (d x + c\right ) + 3\right )} \sin \left (d x + c\right ) - 2 \, \cos \left (d x + c\right ) - 3\right )} \sqrt {a \sin \left (d x + c\right ) + a} \sqrt {a} - 9 \, a \cos \left (d x + c\right ) + {\left (a \cos \left (d x + c\right )^{2} + 8 \, a \cos \left (d x + c\right ) - a\right )} \sin \left (d x + c\right ) - a}{\cos \left (d x + c\right )^{3} + \cos \left (d x + c\right )^{2} + {\left (\cos \left (d x + c\right )^{2} - 1\right )} \sin \left (d x + c\right ) - \cos \left (d x + c\right ) - 1}\right ) + \frac {8 \, \sqrt {2} {\left (a \cos \left (d x + c\right )^{3} + a \cos \left (d x + c\right )^{2} - a \cos \left (d x + c\right ) + {\left (a \cos \left (d x + c\right )^{2} - a\right )} \sin \left (d x + c\right ) - a\right )} \log \left (-\frac {\cos \left (d x + c\right )^{2} - {\left (\cos \left (d x + c\right ) - 2\right )} \sin \left (d x + c\right ) + \frac {2 \, \sqrt {2} \sqrt {a \sin \left (d x + c\right ) + a} {\left (\cos \left (d x + c\right ) - \sin \left (d x + c\right ) + 1\right )}}{\sqrt {a}} + 3 \, \cos \left (d x + c\right ) + 2}{\cos \left (d x + c\right )^{2} - {\left (\cos \left (d x + c\right ) + 2\right )} \sin \left (d x + c\right ) - \cos \left (d x + c\right ) - 2}\right )}{\sqrt {a}} - 4 \, {\left (\cos \left (d x + c\right )^{2} + {\left (\cos \left (d x + c\right ) + 3\right )} \sin \left (d x + c\right ) - 2 \, \cos \left (d x + c\right ) - 3\right )} \sqrt {a \sin \left (d x + c\right ) + a}}{16 \, {\left (a d \cos \left (d x + c\right )^{3} + a d \cos \left (d x + c\right )^{2} - a d \cos \left (d x + c\right ) - a d + {\left (a d \cos \left (d x + c\right )^{2} - a d\right )} \sin \left (d x + c\right )\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\csc ^{3}{\left (c + d x \right )}}{\sqrt {a \left (\sin {\left (c + d x \right )} + 1\right )}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.55, size = 222, normalized size = 1.52 \begin {gather*} -\frac {\frac {4 \, \sqrt {2} \log \left (\sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1\right )}{\sqrt {a} \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )} - \frac {4 \, \sqrt {2} \log \left (-\sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1\right )}{\sqrt {a} \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )} - \frac {7 \, \log \left (\frac {{\left | -16 \, \sqrt {2} - 32 \, \sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \right |}}{{\left | 16 \, \sqrt {2} - 32 \, \sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \right |}}\right )}{\sqrt {a} \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )} - \frac {2 \, \sqrt {2} {\left (2 \, \sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + \sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{{\left (2 \, \sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right )}^{2} \sqrt {a} \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{8 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {1}{{\sin \left (c+d\,x\right )}^3\,\sqrt {a+a\,\sin \left (c+d\,x\right )}} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________